/*
 * This source code is part of TWaver 4.0
 *
 * Serva Software PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * Copyright 2002 - 2011 Serva Software. All rights reserved.
 */

package demo.network.miscellaneous.shapeimage;

import twaver.RotatableNode;
import twaver.animate.Animate;

public class AnimateShowing extends Animate{
	
	private RotatableNode element;
	
	public AnimateShowing(RotatableNode element){
		super(null, 20, -1);
		this.element = element;
	}
	
	public void step(int stepIndex) {
		float t = stepIndex/(float)stepSize;
		if(stepIndex == stepSize){
			element.putRenderAlpha(1);
			element.setZoom(1);
			element.setAngle(0);
		}else{
			element.putRenderAlpha(t);	
			element.setZoom(t);
			element.setAngle(-t*360);	
		}
	}

}